package org.lagou.controller;

import org.lagou.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

@Controller
@RequestMapping("/user")
@ResponseBody
public class UserController {
    @Autowired
    UserService userService;

    @RequestMapping("login")
    public Map<String, Object> login(String username, String password) {

        return userService.login(username, password);
    }

}
